home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / Effect library / Demo ƒ / MSG Shell ƒ / msg prefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-12  |  2.2 KB  |  81 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        msg prefs.h
  4.  
  5. Purpose:    This is the header file for msg prefs.c
  6.  
  7.  
  8. MSG Demo -- graphic effects demonstration program
  9. Copyright (C) 1992-4 Mark Pilgrim & Dave Blumenthal
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program in a file named "GNU General Public License".
  23. If not, write to the Free Software Foundation, 675 Mass Ave,
  24. Cambridge, MA 02139, USA.
  25.  
  26. \**********************************************************************/
  27.  
  28. #include "Folders.h"
  29.  
  30. #define        PREFS_FILE_NAME            "\pMSG Demo prefs"
  31. #define        PREFS_TYPE                'PREF'
  32. // CREATOR is #defined in "program globals.h"
  33. #define        PREFS_HEADER_VERSION    2
  34.  
  35. extern    Boolean        gCanSavePrefs;
  36. extern    Str255        gMyName;
  37. extern    Str255        gMyOrg;
  38.  
  39. typedef struct
  40. {
  41.     char            regname[40];
  42.     char            regorg[40];
  43.     unsigned char    sound;
  44.     unsigned char    isreversed;
  45.     unsigned char    isfirstpict;
  46.     unsigned char    unused;
  47.     int                lastwipe;
  48.     int                wipestatus;
  49.     long            fileID;
  50. } PrefStruct;
  51.  
  52. int PreferencesInit(void);
  53. void PrefsError(int err);
  54. int OpenPrefsFile(int *prefsFileID);
  55. int SetupNewPrefsFile(int prefsFileID);
  56. void ClosePrefsFile(int prefsFileID);
  57. int GetNextPrefs(int prefsFileID);
  58. int SavePrefs(int prefsFileID);
  59. int CheckVersion(int prefsFileID);
  60. int GetFileID(void);
  61. int CheckFileID(void);
  62. int Virgin(int prefsFileID);
  63. void DefaultPrefs(void);
  64. void CopyGlobalsToPrefs(void);
  65. void CopyPrefsToGlobals(void);
  66. void GetRegistration(void);
  67. void SaveThePrefs(void);
  68.  
  69. enum
  70. {
  71.     prefs_allsWell=0,
  72.     prefs_diskReadErr=-1,
  73.     prefs_diskWriteErr=-2,
  74.     prefs_cantOpenPrefsErr=-3,
  75.     prefs_cantCreatePrefsErr=-4,
  76.     prefs_noMorePrefsErr=-5,
  77.     prefs_versionNotSupportedErr=-6,
  78.     prefs_virginErr=-7,
  79.     prefs_IDNotMatchErr=-8
  80. };
  81.